<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>取得最近一条查询的信息</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mysql-get-server-info.html">mysql_get_server_info</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mysql-insert-id.html">mysql_insert_id</a></div>
 <div class="up"><a href="ref.mysql.html">MySQL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.mysql-info" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">mysql_info</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">mysql_info</span> &mdash; <span class="dc-title">
     取得最近一条查询的信息
    </span></p>

   </div>
   <div class="refsect1 unknown-unknown-unknown-unknown-unknown-seealst" id="refsect1-function.mysql-info-unknown-unknown-unknown-unknown-unknown-seealst">
    <h3 class="title">说明</h3>
    <div class="methodsynopsis dc-description">
     <span class="type">string</span> <span class="methodname"><strong>mysql_info</strong></span>
      ([ <span class="methodparam"><span class="type">resource</span> <code class="parameter">$link_identifier</code></span>
    ] )</div>

    <p class="para rdfs-comment">
     <span class="function"><strong>mysql_info()</strong></span>
     返回通过给定的
     <em><code class="parameter">link_identifier</code></em>
     所进行的最新一条查询的详细信息。如果没有指定
     <em><code class="parameter">link_identifier</code></em>，则假定为上一个打开的连接。
    </p>
    <p class="para">
     <span class="function"><strong>mysql_info()</strong></span>
     对以下列出的所有语句返回一个字符串。对于其它任何语句返回
     <strong><code>FALSE</code></strong>。字符串的格式取决于给出的语句。
     <div class="example" id="example-1572">
      <p><strong>Example #1 相关的 MySQL 语句</strong></p>
      <div class="example-contents">
<div class="mysqlcode"><pre class="mysqlcode">INSERT INTO ... SELECT ...
字符串格式：Records: 23 Duplicates: 0 Warnings: 0
INSERT INTO ... VALUES (...),(...),(...)...
字符串格式：Records: 37 Duplicates: 0 Warnings: 0
LOAD DATA INFILE ...
字符串格式：Records: 42 Deleted: 0 Skipped: 0 Warnings: 0
ALTER TABLE
字符串格式：Records: 60 Duplicates: 0 Warnings: 0
UPDATE
字符串格式：Rows matched: 65 Changed: 65 Warnings: 0</pre>
</div>
      </div>

     </div>
     上例中的数字只是为了演示的目的，实际的值取决于查询。
    </p>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      <span class="function"><strong>mysql_info()</strong></span>
      对于
      INSERT ... VALUES
      语句仅在该语句中列出了多个值的情况下返回一个非 <strong><code>FALSE</code></strong> 的值。
    </p>
    </p></blockquote>
    <p class="para">
     参见 <span class="function"><a href="function.mysql-affected-rows.html" class="function">mysql_affected_rows()</a></span>。
    </p>
   </div>

  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mysql-get-server-info.html">mysql_get_server_info</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mysql-insert-id.html">mysql_insert_id</a></div>
 <div class="up"><a href="ref.mysql.html">MySQL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
